class CreateAuthorities < ActiveRecord::Migration
  def self.up
    create_table :authorities do |t|
      t.column :lock_version, :integer,   :null => false
      t.column :name,         :string,    :null => false, :limit => 40
      t.column :created_at,   :timestamp, :null => false
      t.column :updated_at,   :timestamp, :null => false
    end

    add_index :authorities, :name, :unique => true
  end

  def self.down
    drop_table :authorities
  end
end
